<template>
    <div>
    <van-nav-bar
        title="标题"
        left-text="返回"
        right-text="按钮"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
        />
  <template>
        <div>
            
            <h3>{{xxx.name}} </h3>
            <img :src=xxx.pic alt="">
            <p v-html="xxx.content"></p>
            <h4>功能主治: {{xxx.tag}} </h4>
            <p>做法时长:{{xxx.preparetime}} </p>
        </div>


</template>

 





    </div>
</template>



<script>
export default {
   
   data(){
       return {
           xxx: {

           }
       }
   },
    methods:{
 onClickLeft() {
     
      this.$router.go(-1);
      
    },
    onClickRight() {
    
    },

   },  

  
  




   mounted(){
   let id = this.$route.query.id;

      console.log(`收到新值 ${id} `)
       this.axios.get(`/recipe/detail?id=${id}&appkey=5a432523cf279ce2`).then(res=>{ 
           console.log(res.data.result)
           this.xxx = res.data.result
           })
   
   
   
   }


  
}
</script>